/**
 * @author Farah
 */
//Constructor for fence object
function fence(config){
	this.radius = config.radius;
	console.log('fence created'+ this.radius);
	
} 

fence.prototype.createFence = function(){
	
	// Current value of Fence
    var currFenceOptions = {
      strokeColor: '#6600FF',
      strokeOpacity: 0.8,
      strokeWeight: 2,
      fillColor: '#99CCFF',
      fillOpacity: 0.35,
      map: map,
      center: new google.maps.LatLng(homePos.lat(), homePos.lng()),
      radius: this.radius
    };
    
    // Add the circle for this city to the map.
    
    circle = new google.maps.Circle(currFenceOptions);
	
}

/**
*   removes the fence circle from the map
*/
fence.prototype.removeFence= function (oldFence)
{
    oldFence.setMap(null);
}